#pragma once

#include "commons.hxx"

#define REGISTER_SERVICES(site,decision,args) info_syslog("*Register services, from: '%s.dll(.so)'...\n",TO_STRING(site));CHECK(OUR_register_services(decision,args))
#define REGISTER_SERVICE(name,func,argc,argv,rett) info_syslog("@Service - %s\n",name);CHECK(USERSERVICE_register_method(name,func,argc,argv,rett))

/// <summary>
/// 定义 Service 结构
/// </summary>
typedef struct tag_service {
	char* name;
	USER_function_t func;
	int   argc;
	int* argv;
	int   rett;
} OUR_service;

int OUR_register_services(int* decision, va_list args);
